<?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

require_once(dirname(__FILE__).'/../lib/BasesfGuardAuthActions.class.php');

/**
 *
 * @package    symfony
 * @subpackage plugin
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: actions.class.php 7634 2008-02-27 18:01:40Z fabien $
 */
class sfGuardAuthActions extends BasesfGuardAuthActions
{
	public function preExecute()
	{
		$context = sfContext::getInstance();
		$request = $context->getRequest();
		
		if($request instanceof sfWebRequest)
		{
			if(!$request->isXmlHttpRequest())
			{
				$this->setLayout('login');
			}	
		}
		else
		{
			$this->setLayout('login');
		}
		
	}
}
